Skip to content

Fix password prompt conditions - #271

Merged
ravjotbrar merged 14 commits into
mainfrom
fix/password-prompt
Apr 11, 2026
Merged

Fix password prompt conditions#271
ravjotbrar merged 14 commits into
mainfrom
fix/password-prompt

Conversation

@ravjotbrar

Copy link
Copy Markdown
Collaborator

Description

Prior to this change, if a user (on Electron) connects to their instance that did not require a password initially, they would be prompted for one upon reconnect. Now the empty password is saved in local storage.

Additionally, when a user connected with IAM, they would be prompted with a password since there was no guard.

Change Visualization

Include a screenshot/video of before and after the change.

Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
if (!lastOpenedNode) return
if (lastOpenedNode.connection.connectionDetails.password === undefined && onPasswordRequired) {
const { password, authType } = lastOpenedNode.connection.connectionDetails
if (authType !== "iam" && password === undefined && onPasswordRequired) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

password === undefined — I'm really worried about all these conditions when we have "" and the ghost of null lurking. I'd really suggest we create a util function

const isBlank = R.either(R.isNil, R.isEmpty)

and do isBlank(password)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
Signed-off-by: Ravjot Brar <ravjot.brar@improving.com>
@ravjotbrar
ravjotbrar merged commit b046a15 into main Apr 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants